package cn.threadpool;

import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.ThreadPoolExecutor.AbortPolicy;
import java.util.concurrent.TimeUnit;

/**
 * @author summit
 * @since 2022/5/17 10:47
 */
public class PoolTest1 {
	public static void main(String[] args) {
//		Executors.newWorkStealingPool()

		ThreadPoolExecutor threadPoolExecutor = new ThreadPoolExecutor(
				2,
				80 * 2,
				1L,
				TimeUnit.SECONDS,
				new LinkedBlockingQueue<>(3),
				Executors.defaultThreadFactory(),
				new AbortPolicy()
		);
		ExecutorService threadPool = threadPoolExecutor;
	}
}
